import { sys } from 'cc'

const myArmsList = {
    set: undefined,
    get: undefined,
}

// 设置武器
myArmsList.set = (value: []) => {
    sys.localStorage.setItem('myArmsList', JSON.stringify(value))
}

// 获取武器
myArmsList.get = () => {
    if(sys.localStorage.getItem('myArmsList')) {
        return JSON.parse(sys.localStorage.getItem('myArmsList'))
    }else {
        return []
    }
}

myArmsList.set([
    { uuid: 'zhen_hong', number: 4 },
    { uuid: 'zhen_hong', number: 4 },
    { uuid: 'zhen_hong', number: 4 },
    { uuid: 'zhen_hong', number: 4 },
    { uuid: 'zi_wei', number: 4 },
    { uuid: 'shen_sheng', number: 4 },
])

export default myArmsList